package com.huirui.server.pojo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.LocalTime;

/**
 * 秒杀商品视图对象，用于展示秒杀活动中的商品信息
 */
@Data
@Schema(description = "秒杀商品视图对象，用于展示秒杀活动中的商品信息")
public class SeckillProductVo {

    @Schema(description = "商品ID")
    private Long id;

    @Schema(description = "秒杀活动ID")
    private Long activityId;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description = "秒杀开始时间")
    private LocalDateTime seckillStartTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description = "秒杀结束时间")
    private LocalDateTime seckillEndTime;

    @Schema(description = "商品图片")
    private String imageUrl;

    @Schema(description = "商品名称")
    private String productName;

    @Schema(description = "总体库存")
    private Long stock;

    @Schema(description = "现有库存")
    private Long availableStock;

    @Schema(description = "规格最低价")
    private BigDecimal minPrice;

    @Schema(description = "规格最高价")
    private BigDecimal maxPrice;

    @Schema(description = "秒杀最低价")
    private BigDecimal minSeckillPrice;

    @Schema(description = "秒杀最高价")
    private BigDecimal maxSeckillPrice;

    @Schema(description = "秒杀状态,0-开启秒杀，1-关闭秒杀")
    private Integer seckillStatus;

    @Schema(description = "默认规格秒杀价")
    private BigDecimal seckillPrice;

    @Schema(description = "默认规格原价")
    private BigDecimal discountPrice;

    @Schema(description = "折扣率")
    private BigDecimal discountRate;
}
